#pragma once
#include "singleton.h"
const DWORD WOW_SCALE               = 0X1001;
const DWORD WOW_GuidBase            = WOW_SCALE*1;
const DWORD WOW_HWND                = WOW_SCALE*2;
const DWORD WOW_Object              = WOW_SCALE*3;
const DWORD WOW_GameObject          = WOW_SCALE*4; 
const DWORD WOW_Unit                = WOW_SCALE*5; 
const DWORD WOW_Player              = WOW_SCALE*6; 
const DWORD WOW_Target              = WOW_SCALE*7; 
const DWORD WOW_FUNC                = WOW_SCALE*8;
const DWORD WOW_LOOT                = WOW_SCALE*9;
const DWORD WOW_ACTION              = WOW_SCALE*10;
const DWORD WOW_LOAD                = WOW_SCALE*11;
const DWORD WOW_TARGET_FUN          = WOW_SCALE*12; 
const DWORD WOW_Spell               = WOW_SCALE*13;
const DWORD WOW_CastSpell           = WOW_SCALE*14;
const DWORD WOW_CItem               = WOW_SCALE*15;
const DWORD WOW_CBags               = WOW_SCALE*16;
const DWORD WOW_NPC                 = WOW_SCALE*17;
const DWORD WOW_Mail                = WOW_SCALE*18; 
const DWORD WOW_WordsBase           = WOW_SCALE*19; 
const DWORD WOW_ShopBase            = WOW_SCALE*20;
const DWORD WOW_BattlefieldBase     = WOW_SCALE*21;








class CKeyMemory:public Singleton<CKeyMemory>
{
    struct sData
    {
        DWORD key;
        DWORD data;
    };
    typedef std::map<DWORD, DWORD> MapDD;
    MapDD   m_MapData;
    CString m_strVersion;
    HANDLE  m_hFile;
    DWORD   m_dwVersion;
    void Add313_10146();
    void Add333_11723();
    void Add335_12213();
    void Add335_12340();
	void Add322_12484();
    void Add401_13164();
    void Add401_13205();
    void Add401_13287();
    void Add401_13329();
    void Add406_13596();
    void Add406_13623();
public:
    CKeyMemory();
    void Write();
    bool Init();
    DWORD Get(DWORD key);
    DWORD dwDeltaBase;
};

CKeyMemory& KeyMem();

#define WOW_GET(T) ( KeyMem().Get((DWORD)(T)) )